<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/iconfont.css">
	<link rel="stylesheet" href="css/global.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/styles.css">
	<link rel="stylesheet" href="css/logo.css" />
	<link rel="stylesheet"  type="text/css" href="css/sandian/iconfont.css">
	<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="js/swiper.min.js" charset="UTF-8"></script>
	<script src="js/global.js" charset="UTF-8"></script>
	<!-- <script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script> -->
	<title>秒杀</title>
	<style>
	
	#guding{
		position: relative;
		top: 0;
		left: 0;
		padding-left: 100px;
	}
	.hui-yuan{
		text-decoration:line-through;
	}
	
	
	/* 下架商品 数量0 自动下架 就是把关联表state 1改0; */
	
	</style>
</head>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<body>
	<!-- 顶部tab -->
	<div id="dingdan"></div>
	<div id="body1"></div>
	<!-- <div id="djs2"></div> -->
	<!-- 搜索栏 -->
	
	<!-- <div class="bgf5 clearfix">
			<div class="top-user">
				<div class="inner">
					<a class="logo" href="index.html"><li id="logo"><></a>
					<div class="title">个人中心</div>
				</div>
			</div>
		</div> -->
		
		<!-- 搜索栏 -->
		<div class="top-search" style="background: white;">
			<div class="inner">
				<a class="logo" href="index.html"><li id="logo"></li></a>
				<div class="search-box">
				


				</div>
				<a href="zjd.html">
		 <div style="position: fixed;bottom: 300px;right: 10.0px;z-index: 100000;cursor: pointer;
	width: 60.0px;height: 60.0px;line-height: 60.0px;background-image: url(images/jd.png);background-size: 60.0px 60.0px;" class="mm_wf_d11_shake">
			</div>
				</a>
			<div class="cart-box">
				<a href="udai_shopcart.html" class="cart-but">
					<i class="iconfont icon-shopcart cr fz16"></i> 购物车 0 件
				</a>
			</div>
		</div>
	</div>
	<!-- 内页导航栏 -->
	<div class="top-nav bg3">
		<div class="nav-box inner">
			<div class="all-cat">
				<div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
			</div>
			<ul class="nva-list" id="nva-list">
				
			</ul>
		</div>
	</div>
	<div class="content inner">
		<section class="panel__div clearfix">
			<!-- <div class="filter-value" id="body"></div> -->
			<div class="filter-value" id="guding">
				<div class="huanyanse" id="yidaojishi" onclick="shuaxin()"></div>
				
				<div id="body2"></div>
				
			</div>
			
			<div class="html-code">
				<div class="content inner" style="margin-bottom: 40px;">
					
					<section class="scroll-floor floor-3">
						<div class="floor-title">
							<i class="iconfont icon-shandian fz20"></i> 秒杀
							<div class="case-list fz0 pull-right">
								<a>饮食</a>
								<a>服饰</a>
								<a>数码</a>
								<a>手机</a>
								<a>家具</a>
								<a>电器</a>
							</div>
						</div>
						<div class="con-box">
						</div>
					</section>
				
				</div>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.html" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.html" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.html" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.html" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		
	</div>
	<!-- 底部信息 -->
	<div class="footer">
		<div class="footer-tags">
			<div class="tags-box inner">
				<div class="tag-div">
					<img src="images/icons/footer_1.gif" alt="厂家直供">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_2.gif" alt="一件代发">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_3.gif" alt="美工活动支持">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_4.gif" alt="信誉认证">
				</div>
			</div>
		</div>
		<div class="footer-links inner">
			<dl>
				<dt>XXX</dt>
				<a href="temp_article/udai_article10.html"><dd>企业简介</dd></a>
				<a href="temp_article/udai_article11.html"><dd>加入U袋</dd></a>
				<a href="temp_article/udai_article12.html"><dd>隐私说明</dd></a>
			</dl>
			<dl>
				<dt>服务中心</dt>
				<a href="temp_article/udai_article1.html"><dd>售后服务</dd></a>
				<a href="temp_article/udai_article2.html"><dd>配送服务</dd></a>
				<a href="temp_article/udai_article3.html"><dd>用户协议</dd></a>
				<a href="temp_article/udai_article4.html"><dd>常见问题</dd></a>
			</dl>
			<dl>
				<dt>新手上路</dt>
				<a href="temp_article/udai_article5.html"><dd>如何成为代理商</dd></a>
				<a href="temp_article/udai_article6.html"><dd>代销商上架教程</dd></a>
				<a href="temp_article/udai_article7.html"><dd>分销商常见问题</dd></a>
				<a href="temp_article/udai_article8.html"><dd>付款账户</dd></a>
			</dl>
		</div>
		<div class="copy-box clearfix">
			<ul class="copy-links">
				<a href="agent_level.html"><li>网店代销</li></a>
				<a href="class_room.html"><li>U袋学堂</li></a>
				<a href="udai_about.html"><li>联系我们</li></a>
				<a href="temp_article/udai_article10.html"><li>企业简介</li></a>
				<a href="temp_article/udai_article5.html"><li>新手上路</li></a>
			</ul>
			<!-- 版权 -->
			<p class="copyright">
				© 2005-2017 XXX 版权所有，并保留所有权利<br>
				ICP备案证书号：闽ICP备XXX号-2&nbsp;&nbsp;&nbsp;&nbsp;福建省宁德市XXX&nbsp;&nbsp;&nbsp;&nbsp;Tel: XXX&nbsp;&nbsp;&nbsp;&nbsp;E-mail: XXX@qq.com
			</p>
		</div>
	</div>
</body>

<script  type="text/javascript">
			
			chashanmian () 
			function chashanmian () {
				var yidaojishi=document.getElementById("yidaojishi");
				// alert(yidaojishi.innerHTML);
					if(yidaojishi.innerHTML==null){
						yidaojishi.style.background=''
					}
				$.ajax({
					xhrFields:{withCredentials: true},
					method:"post",
					url:"http://localhost:16111/activity/huoqusj",
					success:function(date){
						var str="";
						var str1="";
						for(i in date){
							
							var xzsj=+new Date();
							var xx=new Date();
							var startTime=new Date(date[i].openingtime);
							var startTime1=new Date(date[i].endtime);
						
							var jin=xx.getDate();
							var sjk=startTime.getDate();
							
							var hour1=startTime.getHours();//获取小时
							hour1=hour1>9?hour1:"0"+hour1;
							// alert(hour1)
							var djs=(startTime-xzsj)/1000;
							var miao=parseInt(djs%60)
							
							var djs2=(startTime1-xzsj)/1000;
							var miao2=parseInt(djs2%60)
							
							if(xzsj>startTime1){
								gai(date[i].endtime);
							}
							
							// alert(miao)
							if(jin<=sjk && miao>0 ){
								
							var djs=(startTime-xzsj)/1000;
							var shi= parseInt(djs/60/60%24)
							var fen= parseInt(djs/60%60)
							var miao=parseInt(djs%60)
							shi=shi>9?shi:"0"+shi 
							miao=miao>9?miao:"0"+miao;
							fen=fen>9?fen:"0"+fen;
							var sj=shi+":"+fen+":"+miao
							// alertsjk-jin
							if((sjk-jin)>=1){
								mt="明天";
								str+="<div class='filter-title' onclick=dianji(this,"+date[i].commodityid+","+hour1+","+date[i].msid+")>"+mt+hour1+':00 '+"<span>即将开始</span>"+"<span class='xuanzhe'></span>"+"</div>";
							}else{
								str+="<div class='filter-title' onclick=dianji(this,"+date[i].commodityid+","+hour1+","+date[i].msid+")>"+hour1+':00 '+"<span>即将开始</span>"+"<span class='xuanzhe'></span>"+"</div>";
							}
							var a=document.getElementById("body2");
							a.innerHTML=str;
							}
							else if(miao2>0)
							{
									var djs=(startTime1-xzsj)/1000;
									var shi= parseInt(djs/60/60%24)
									var fen= parseInt(djs/60%60)
									var miao=parseInt(djs%60)
									shi=shi>9?shi:"0"+shi 
									miao=miao>9?miao:"0"+miao;
									fen=fen>9?fen:"0"+fen;
									var sj=shi+":"+fen+":"+miao
								//ssr+="<div onclick=dianji("+date[i].commodityid+","+hour1+","+date[i].msid+")>"+"<span>"+date[i].openingtime+"</span>"+"</div>"
								// str1+="<div onclick=dianji("+date[i].commodityid+","+hour1+","+date[i].msid+")>"+"<span id='bhbh'>"+date[i].commodityid+"</span>"+hour1+':00 正在秒杀'+"</div>"
							if(shi<=2){
								sessionStorage.setItem("js",date[i].endtime)
								sessionStorage.setItem("ks",date[i].openingtime)
									// alert(sj)
									// var b=document.getElementById("body1");
									// b.innerHTML=ssr;
									// var a=document.getElementById("yidaojishi");
									// a.innerHTML=str1;
									var msid=date[i].msid
									sessionStorage.setItem("msid",msid)
									sessionStorage.setItem("commodityid",date[i].commodityid)
								}
							}
							
						}
					},
					
				});
			}
			// 第一个定时器 倒时间
			var realtime=setInterval(yidaojishi,10);
			function yidaojishi() {
				var jieshu=sessionStorage.getItem("js");//这个是获取结束时间
				var kaishi=sessionStorage.getItem("ks");//这个是获取开始时间
				var p=document.getElementsByClassName("huanyanse");
				 if(kaishi==null){
				 	clearInterval(realtime);
				 	p[0].style.display='none'
				 	return;
				 }
				// alert(kaishi[0].innerHTML)
				var xzsj=+new Date();
				var startTime=+new Date(jieshu);
				// alert(jieshu)
				//用来获取开始的时间
				var ksjs=new Date(kaishi);
				var hour1=ksjs.getHours();//获取小时
						//第一个倒计时
						var djs=(startTime-xzsj)/1000;
						var shi= parseInt(djs/60/60%24)
						var fen= parseInt(djs/60%60)
						var miao=parseInt(djs%60)
						shi=shi>9?shi:"0"+shi 
						miao=miao>9?miao:"0"+miao;
						fen=fen>9?fen:"0"+fen;
						var sj=shi+":"+fen+":"+miao
						
						if(xzsj>startTime){
							window.location.reload();
						}else{
						document.getElementById("yidaojishi").innerHTML=hour1+":00 正在秒杀距离结束还:"+sj;
						}
					}
		
			
			//时间过期改状态
			function gai (endtime) {
				// alert(endtime);
				$.ajax({
					xhrFields:{withCredentials: true},

					method:"post",
					url:"http://localhost:16111/activity/gai",
					dataType:"json",
					data:{endtime:endtime},
					success:function(date){
						if(date==true){
							alert("本场秒杀活动结束啦，看看最新的秒杀吧~");
							window.location.reload();//刷新页面
						}
				},
				})
			}
			
			
			
			//第一个查图片
			var diyige=setInterval(diyige,10);
			function diyige () {
				clearInterval(this.diyige)
				var msid=sessionStorage.getItem("msid")
				var commodityid=sessionStorage.getItem("commodityid")
				if(msid==null){
					clearInterval(diyige);
					return;
				}
				$.ajax({
					xhrFields:{withCredentials: true},

				method:"post",
					url:"http://localhost:16111/activity/qiehuan",
					dataType:"json",
					data:{commodityid:commodityid,msid:msid},
					success:function(date){
						str="";
						yj="";
						xj="";
						for(i in date){
							yj=date[i].commodity_price
							xj=date[i].spikeprice
							if(yj>xj){
								var msj=yj-xj
							}else{
								var msj=1
							}
							str+="<a class='floor-item shanyi'>"+
							"<div class='item-img hot-img'>"+
							"<img  src="+date[i].commodity_picture+" class='cover'>"+
							"</div>"+
							"<div class='price clearfix'>"+
							"<span class='pull-left cr fz16'>秒杀价:￥"+msj+"</span>"+
							"<span class='pull-right c6 hui-yuan' >原价"+date[i].commodity_price+"</span>"+
							"</div>"+
							"<div class='name ep' title="+date[i].commodity_description+">"+date[i].commodity_description+"</div>"+
							"<input type='button' class='annvnv1' value='立即抢购' onclick='jianshulian("+date[i].category_id+","+date[i].id+")'>"+
							"</a>"
						
						}
						
						var box=document.getElementsByClassName("con-box");
						// for(i in box){
							box[0].innerHTML=str;
							// }
						},
					})
			}
			//刷新页面
			function shuaxin () {
				window.location.reload();
			}
			
			//点击抢购跳转详情界面
			function jianshulian (category_id,id) {
//				alert(category_id)
//				alert(id)
				location.href = "item_show.html?id="+id+"="+category_id;
				
			}
			
			//切换图片 点击之后要改变颜色
			function dianji(t,commodityid,hour1,msid) {
				var yidaojishi=document.getElementById("yidaojishi").innerHTML;
				var fuzhi=yidaojishi.split(" ",1)
				document.getElementById("yidaojishi").innerHTML=fuzhi+' 进行中';
				// alert(commodityid)
				// alert(hour1)
				// alert(msid)
				
				selectmsid(msid,t);
				
				$.ajax({
					xhrFields:{withCredentials: true},

				method:"post",
					url:"http://localhost:16111/activity/qiehuan",
					dataType:"json",
					data:{commodityid:commodityid,msid:msid},
					success:function(date){
						str="";
						yj="";
						xj="";
						for(i in date){
							yj=date[i].commodity_price
							xj=date[i].spikeprice
							if(yj>xj){
								var msj=yj-xj
							}else{
								var msj=1
							}
							str+="<a class='floor-item shanyi'>"+
							"<div class='item-img hot-img'>"+
							"<img  src="+date[i].commodity_picture+" class='cover'>"+
							"</div>"+
							"<div class='price clearfix'>"+
							"<span class='pull-left cr fz16'>秒杀价:￥"+msj+"</span>"+
							"<span class='pull-right c6 hui-yuan' >原价"+date[i].commodity_price+"</span>"+
							"</div>"+
							"<div class='name ep' title="+date[i].commodity_description+">"+date[i].commodity_description+"</div>"+
							"<input type='button' class='annvnv2' value='即将开始'>"+
							"</a>"
							
						}
						// var cbox=document.getElementById("cbox").innerHTML=str;
						var box=document.getElementsByClassName("con-box");
						box[0].innerHTML=str;
								
						},
					})
			}
			//即将开始不让点进去
			function jijian () {
				alert("即将开始,暂时不能抢购")
			}
			
			function selectmsid (msid,t) {
				// alert(t.innerHTML)
				clearInterval(realtime);
				$.ajax({
					xhrFields:{withCredentials: true},

					method:"post",
					url:"http://localhost:16111/activity/selectmsid",
					dataType:"json",
					data:{msid:msid},
					success:function(date){
						var ret;
						ret=date[0].openingtime;
						sessionStorage.setItem("ret",ret)
						setInterval(huomian,1000)
					
				},
			})
			}
			function huomian () {
				var openingtime=sessionStorage.getItem("ret");
				var duibi=openingtime.substr(10,14)
				// alert(duibi)
				// setInterval(huomian,1000)
				var xzsj=+new Date();
				var xx=new Date();
				var startTime=new Date(openingtime);
				
				var djs=(startTime-xzsj)/1000;
				var shi= parseInt(djs/60/60%24)
				var fen= parseInt(djs/60%60)
				var miao=parseInt(djs%60)
				shi=shi>9?shi:"0"+shi 
				miao=miao>9?miao:"0"+miao;
				fen=fen>9?fen:"0"+fen;
				var sj=shi+":"+fen+":"+miao
				// var ss=document.getElementById("djs2").innerHTML=sj;
				if(miao>0){
					
				var xz=document.getElementsByClassName("xuanzhe");
				var yanse=document.getElementsByClassName("filter-title");
				// alert(shi)
				// var pd=shi.substr(1,2)
				// alert(pd)
				// window.location.reload();
				var p=document.getElementsByClassName("huanyanse")
				
				if(shi==1||shi==0){
					xz[0].innerHTML=" 距离开始还："+sj
					xz[1].innerHTML="";
					xz[2].innerHTML=""
					xz[3].innerHTML=""
					// alert(1);
					yanse[0].style.background='#000000'
					yanse[2].style.background='#E73732'
					yanse[1].style.background='#E73732'
					yanse[3].style.background='#E73732'
					// p[0].classList.add("ysysy");
					p[0].style.background='#E73732'
					
				}
				else if(shi==2||shi==3){
				xz[1].innerHTML=" 距离开始还："+sj
				xz[0].innerHTML=""
				xz[2].innerHTML=""
				xz[3].innerHTML=""
				
				yanse[1].style.background='#000000'
				yanse[2].style.background='#E73732'
				yanse[0].style.background='#E73732'
				yanse[3].style.background='#E73732'
				// p[0].classList.add("ysysy");
				p[0].style.background='#E73732'
				}
				else if(shi==4||shi==5){
				xz[2].innerHTML=" 距离开始还："+sj
				xz[0].innerHTML=""
				xz[1].innerHTML=""
				xz[3].innerHTML=""
				
				yanse[2].style.background='#000000'
				yanse[0].style.background='#E73732'
				yanse[1].style.background='#E73732'
				yanse[3].style.background='#E73732'
				// p[0].classList.add("ysysy");
				p[0].style.background='#E73732'
				
				}else{
				xz[3].innerHTML=" 距离开始还："+sj
				xz[1].innerHTML=""
				xz[2].innerHTML=""
				xz[0].innerHTML=""
				
				yanse[3].style.background='#000000'
				yanse[1].style.background='#E73732'
				yanse[2].style.background='#E73732'
				yanse[0].style.background='#E73732'
				// p[0].classList.add("ysysy");
				p[0].style.background='#E73732'
				}
				
				}else{
					window.location.reload();
				}
			}
			// window.scrollTo=200
			
</script>


<script>
		   selects();
     	//模糊查询
     	function selects(){   		
     		$.ajax({
     			xhrFields:{withCredentials: true},

     			type:"get",
     			url:"http://localhost:16111/memurbac/reachbyuseridmemu",
     			dataType:"json", 
     			xhrFields:{withCredentials: true},
     			data:{userid:2},
     			success:function(res){
     				//表示为查询成功，
     				if(res.code==200){

    				
     					   	//添加菜单列表
    		          	
     					for(var i in res.data){
    					    						
     						if(res.data[i].memu_name=="商城主菜单-max"){
    							
     							var data=res.data[i];
     					    //  console.log(JSON.stringify(data))
    							
   							for (var b in data.childMemu) {
   								

   								if(data.childMemu[b].memu_name=="主页"){						
   									str="<a  href=\""+data.childMemu[b].memu_url+"\"><li style=\"color: #f00;\"> "+data.childMemu[b].memu_name+" </li></a>"
   								}else{
   									str="<a href=\""+data.childMemu[b].memu_url+"\"><li> "+data.childMemu[b].memu_name+" </li></a>"
   								}
  								
  								
   								$('#nva-list').html($('#nva-list').html()+str);
   							}
    							
     						}
					
    						
     					}
    					        
    					
     				}else{
    					
     					layui.use("layer", function () {
                 //提示错误信息
     					layer.msg(res.error,{icon:7,time:1000});
              })

    					
    				
    				}
    			},
    			error:function(error){
    			
    				layui.use("layer", function (){
             	//提示错误信息
    				layer.msg(JSON.stringify(error),{icon:2,time:1000});
             })
    				
    			}
    		});
   
    	}
		
//		顶部

	   //gfc 不用乱动
	
	   		function ShowCountDown(jztime, divname,z) {
			var now = new Date();
			var endDate = new Date(Date.parse(jztime.replace(/-/g, "/")));
			var leftTime = endDate.getTime() - now.getTime();
			var leftsecond = parseInt(leftTime / 1000);
			var day1 = Math.floor(leftsecond / (60 * 60 * 24));
			var hour = Math.floor(((leftsecond - day1 * 24 * 60 * 60) / 3600));
			var minute = Math.floor((leftsecond - day1 * 24 * 60 * 60 - hour * 3600) / 60);
			var second = Math.floor(leftsecond - day1 * 24 * 60 * 60 - hour * 3600 - minute * 60);
			if(day1 < 10) {
				day1 = "0" + day1;
			}
			if(hour < 10) {
				hour = "0" + hour;
			}
			if(minute < 10) {
				minute = "0" + minute;
			}
			if(second < 10) {
				second = "0" + second;
			}
			var cc = document.getElementById(divname);
			cc.innerHTML = z+"：<span class='wxml4'>" + (hour*1+(day1*24)) + "</span>：<span>" + minute + "</span>：<span>" + second + "</span>";
		}
		
		
               	$("#dingdan").load("index_head.html");
	var userid = sessionStorage.getItem("userid");
	$(function(){//第一步都得写这个
		$(document).on("click",".centers_listm_one_in",function(){
		$(this).next(".gjszmdm").slideToggle().siblings("gjszmdm").slideUp()
		});
	})
	memu ();
	function memu ()
	{
	
		var list = "";
		$.ajax({
		    type: "post",//请求方式
		    url: "http://localhost:16111/user/MenuSelect",//上s层的路径
			dataType: "json",
		    data:{},//传值
		    xhrFields:{withCredentials: true},
		    success: function (data)
			{
				var user = eval('(' + JSON.stringify(data.data) + ')');
				
				
				list += '<div class=\"centers_listm_one\">'+
            	'<img src=\"images/zshy.png\"/>'+
                '<a href='+user.memu_url+'><em>'+user.memu_name+'</em></a>'+
            	'</div>';
            	for(var i in user.childMemu)
            	{
            		
            		list +='<div class=\"centers_listm_one_in\">'+
                '<img src=\"images/kouw.png\"/>'+
                '<em>'+user.childMemu[i].memu_name+'</em>'+
                '<b></b>'+
            	'</div>'+
            	'<span class="gjszmdm">';
            		for(var x in user.childMemu[i].childMemu)
            		{
            			if(user.childMemu[i].childMemu[x].memu_name=="宝贝收藏")
            			{
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+'?userid='+sessionStorage.getItem("userid")+' class=\"center_in_self\"  target =\"_blank\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}else if(user.childMemu[i].childMemu[x].memu_name=="我的足迹")
            			{ 	
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+'?userid='+sessionStorage.getItem("userid")+' class=\"center_in_self\" target =\"_blank\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}else 
            			{
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+' class=\"center_in_self\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}
            			
		            	
            		}
            		list+='</span>';
            	} 
            	
            	$("#caidan").html(list);
		   }
		})		
		
	}
</script>


<script type="text/javascript" charset="utf-8">
	
			function sousou () {
				// alert(t.innerHTML)
				var commodity_name=document.getElementById("searchInput").value;
				alert(commodity_name)
				$.ajax({
					xhrFields:{withCredentials: true},
					method:"post",
					url:"http://localhost:16111/activity/mohu",
					dataType:"json",
					data:{commodity_name:commodity_name},
					success:function(date){
						str="";
						yj="";
						xj="";
						for(i in date){
							yj=date[i].commodity_price
							xj=date[i].spikeprice
							if(yj>xj){
								var msj=yj-xj
							}else{
								var msj=1
							}
							str+="<a class='floor-item shanyi'>"+
							"<div class='item-img hot-img'>"+
							"<img  src="+date[i].commodity_picture+" class='cover'>"+
							"</div>"+
							"<div class='price clearfix'>"+
							"<span class='pull-left cr fz16'>秒杀价:￥"+msj+"</span>"+
							"<span class='pull-right c6 hui-yuan' >原价"+date[i].commodity_price+"</span>"+
							"</div>"+
							"<div class='name ep' title="+date[i].commodity_description+">"+date[i].commodity_description+"</div>"+
							"<input type='button' class='annvnv1' value='立即抢购' onclick='jianshulian("+date[i].category_id+","+date[i].id+")'>"+
							"</a>"
						
				},
			})
			}
</script>



</html>